//
//  HomeConstiCell.m
//  Ginix
//
//  Created by 冯志强 on 2025/2/23.
//

#import "HomeConstiCell.h"
#import "HXCharts.h"
@interface HomeConstiCell()
@property (nonatomic,strong) HXBarChart * circle;
@end

@implementation HomeConstiCell

-(void)setSubViewLayout{
    [super setSubViewLayout];
    
    self.titleLabel.text = @"体质";

    
    [self addSubview:self.circle];
   
}

-(HXBarChart *)circle{
    
    if (!_circle) {
        _circle = [[HXBarChart alloc] initWithFrame:CGRectMake(30 * FMScaleX,65 * FMScaleX, WIDTH - 60 * FMScaleX, 250 * FMScaleX) withMarkLabelCount:6 withOrientationType:OrientationHorizontal];
        _circle.titleArray = @[@"平和",@"气虚",@"阳虚",@"阴虚",@"痰湿",@"湿热",@"血瘀",@"气郁"];
        _circle.valueArray = @[@"68",@"31",@"27",@"19",@"18",@"17",@"16",@"15"];
        NSArray *color1 = @[RDRGB(0xAC825B),RDRGB(0xA3661F)];
        _circle.colorArray = @[color1,color1,color1,color1,color1,color1,color1,color1];
        _circle.xlineColor = UIColor.clearColor;
        _circle.markTextColor = RDRGB(0xAD7D62);
        _circle.markTextFont = Regular(10);
        _circle.backgroundColor = RDRGBA(0xF5F2ED, 0.7);
        _circle.locations = @[@0.15,@0.85];
        _circle.barWidth = 10 * FMScaleX;
        [_circle drawChart];
    }
    return _circle;
}

@end
